﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ShowLogDetail : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userName"] == null || Session["roleID"] == null)
        {
            Response.Redirect("Login.aspx");
            Response.End();
        }
        else if (Session["roleID"].ToString() != "1")
        {
            Response.Redirect("Default.aspx");
            Response.End();
        }
        GetLogMessageAndBind();
    }
    protected void GetLogMessageAndBind()
    {
        int logID = Convert.ToInt32(Request.QueryString["logid"].ToString());        
        Log showLog = new Log(logID);
        lblLogID.Text = logID.ToString();
        lblAddDate.Text = showLog.AddDate.ToString();
        lblTitle.Text = showLog.Title;
        lblUpUser.Text = showLog.UserName;
        lblContent.Text = showLog.Content;
        showLog.Status = "1";
        showLog.UpdateLog();
 
    }

}
